/**
 * 
 */
package web.actions;

import java.util.Collection;
import java.util.LinkedList;

import org.mentawai.core.BaseAction;

import sistema.contexto.AvaliacaoBLFacade;

/**
 * @author Thiago Emmanuel Pereira da Cunha Silva, thiago.manel@gmail.com
 * @since 14/05/2006
 */
public class ListaLinguagens extends BaseAction {

	/* (non-Javadoc)
	 * @see org.mentawai.core.Action#execute()
	 */
	public String execute() throws Exception {

		AvaliacaoBLFacade ava =  (AvaliacaoBLFacade) input.getValue("avalFacade");
		
		try {
			Collection linguagens = ava.getLinguagens();//ajeitar o tratamento
			output.setValue("linguagens", new LinkedList(linguagens));
//			throw new RuntimeException("PASSOU");
			return SUCCESS;
		} catch (Exception e) {
			return ERROR;
		}

	}

}
